<template>
	<view>
		<view>
			{{msg}}
			<button @click="doit(5,$event)">点我</button>
		</view>
		<view v-for="item in userinfo">姓名：{{item.name}};年龄：{{item.age}}					
		</view>
		<view>
			<image :src="imgurl"></image>
		</view>
		<view>
			年龄：{{age}}岁，{{age>18?"已成年":"未成年"}}
		</view>
		<view>{{5/age}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				msg:"事件讲解",
				age:0,
				imgurl:"../../static/img/bg1.jpg",
				userinfo:[
					{name:"张三",age:18},
					{name:"李四",age:19},
					{name:"王五",age:16}
				]
			}
		},
		methods: {
			doit(num,e){
				
				console.log(num)
				console.log(e)
				this.msg+="网络好卡！"
			}
		}
	}
</script>

<style>

</style>
